package com.amphora.model;

import java.io.Serializable;
import java.util.Calendar;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="treatments")
public class Treatment implements Serializable {

	private static final long serialVersionUID = 2898491076617679649L;

	@Id @GeneratedValue
	@Column(name="id")
	private Long id;
	
	@Column(name="duration")
	private int duration;
	
	@Column(name="totalDone")
	private int totalDone;
	
	@OneToOne
	@JoinColumn(name="treatment_type")
	private TreatmentType treatmentType;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="booking_id", referencedColumnName="id")
	private Booking booking;
	
	public Treatment() {
		super();
	}   
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}   

	public int getDuration() {
		return this.duration;
	}

	public void setDuration(int duration) {
		this.duration = duration;
	}   
	public int getTotalDone() {
		return this.totalDone;
	}

	public void setTotalDone(int totalDone) {
		this.totalDone = totalDone;
	}
	public Booking getBooking() {
		return booking;
	}
	public void setBooking(Booking booking) {
		this.booking = booking;
	}
	public TreatmentType getTreatmentType() {
		return treatmentType;
	}
	public void setTreatmentType(TreatmentType treatmentType) {
		this.treatmentType = treatmentType;
	}
	
	public static String getClassName(){
		return "com.amphora.model.Treatment";
	}
	
	
}
